from django.urls import path
from . import views

urlpatterns = [
    # 关卡相关接口
    path('levels/', views.level_list_view, name='level_list'),
    path('levels/<int:level_id>/', views.level_detail_view, name='level_detail'),
    
    # 题目相关接口
    path('questions/random/', views.random_question_view, name='question_random'),
    path('questions/<int:question_id>/', views.question_detail_view, name='question_detail'),
    
    # 答题相关接口
    path('submit/', views.submit_answer_view, name='submit_answer'),
    path('progress/', views.user_progress_view, name='user_progress'),
    path('progress/<int:level_id>/', views.level_progress_view, name='level_progress'),
    
    # 统计相关接口
    path('stats/', views.user_stats_view, name='user_stats'),
    
    # 排名相关接口
    path('leaderboard/', views.leaderboard_view, name='leaderboard'),
    path('my_rank/', views.my_rank_view, name='my_rank'),
]